# 1-可视化生成的图像
import matplotlib.image as mpimg
import matplotlib.pyplot as plt

num_epochs = 100
for i in range(num_epochs):
    img = mpimg.imread(f'generated_img_epoch_{i}.png')
    plt.imshow(img, cmap='gray')
    plt.title(f"Epoch {i}")
    plt.show()
